import Vue from 'vue'
import moment from 'moment';

import App from './App.vue'
import router from './router'
/*
* 重置样式文件的导入
* */
import './assets/reset.less';
import './assets/common.less';
/*
*
* 完成 vantUI 的导入
* */
import Vant from 'vant';
import 'vant/lib/index.css';

Vue.config.productionTip = false

// 全局过滤器
Vue.filter('formatViewCount', function (num) {
    return (num + '').replace(/\d+/, match => match.replace(/(?!^)(?=(\d{3})+$)/g, ','))
})

Vue.filter('formatTime', function (val) {
    return moment(val).format('YYYY-MM-DD HH:mm:ss');
})

Vue.use(Vant);

new Vue({
    router,
    render: h => h(App)
}).$mount('#app')
